$(document).ready(function()
{
    appearance();    
});


function appearance()
{
    var imgFigaro = $("#imgFigaro");
    var imgLiberation = $("#imgLiberation");
    var imgLemonde = $("#imgLemonde");
    var div = $("#divInner");
    var img = $("#imgStart");
    
    imgFigaro.fadeIn(2500);   
    imgLemonde.fadeIn(2500);
    imgFigaro.animate({left: '-=300px'},500);
    imgLemonde.animate({left: '+=300px'},500);
    
    //imgLiberation.animate({opacity: 0}, 1000);
    //imgLiberation.animate({opacity: 1}, 1000);
    imgLiberation.delay(4000).fadeIn(2000);
    
    div.delay(6000).animate({top: "-="+div.height()/2+"px"},1000);
    img.delay(7000).fadeIn();
    //div.fadeIn();
    
    div.on(
    {
        mouseenter: function(){            
            img.animate({left: "+=" + (div.width() + 1.5*img.width())  + "px"}, "fast");
        },
        mouseleave: function(){
            img.animate({left: "-=" + (div.width() + 1.5*img.width()) + "px"}, "fast");            
        }
    });
}

function gotoPeriod()
{
    $("#form").submit();
}
